<?xml version="1.0" encoding="UTF-8" ?>

<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/templates/application.xhtml">
                
                
	<ui:define name="title"><h:outputText value="Student admission"/></ui:define>
	
	
	<ui:define name="header">
		<h4><h:outputText value="Student admission"/></h4>
		

	</ui:define>
	
	
	<ui:define name="content">
	
		<h:form>
			<p:growl id="messages" showDetail="true" />
 
		    <h:panelGrid id="regPanelGrid" cellspacing="8" columns="3">
					
					<h:panelGroup>
						<h:outputLabel value="#{Message['label.firstname']} :"></h:outputLabel>
						<h:outputText style="color:red;" value="*"></h:outputText>
					</h:panelGroup>
					
					<p:inputText id="firstName" required="true" value="#{student.firstName}" label="#{Message['label.firstname']}" title="#{Message['label.firstname']}">
						<f:validateLength minimum="2"></f:validateLength>
						<p:ajax event="keyup" update="firstNameMsg" global="false"/>
					</p:inputText>
					<h:panelGroup>
						<p:message id="firstNameMsg" for="firstName"/>
						<p:tooltip for="firstName" styleClass="tooltip" showEvent="focus" hideEvent="blur"></p:tooltip>
					</h:panelGroup>
					
					<h:panelGroup>
						<h:outputLabel value="#{Message['label.lastname']} :"></h:outputLabel>
						<h:outputText style="color:red;" value="*"></h:outputText>
					</h:panelGroup>
					
					<p:inputText id="lastName" required="true" value="#{student.lastName}" label="#{Message['label.lastname']}" title="#{Message['label.lastname']}">
						<f:validateLength minimum="2"></f:validateLength>
						<p:ajax event="keyup" update="lastNameMsg" global="false"/>
					</p:inputText>
					<h:panelGroup>
						<p:message id="lastNameMsg" for="lastName"/>
						<p:tooltip for="lastName" styleClass="tooltip" showEvent="focus" hideEvent="blur"></p:tooltip>
					</h:panelGroup>
					
					<h:panelGroup>
						<h:outputLabel value="#{Message['label.address']} :"></h:outputLabel>
						<h:outputText style="" value=""></h:outputText>
					</h:panelGroup>
					
					<p:inputText id="address" value="#{student.address}" label="#{Message['label.address']}" title="#{Message['label.address']}">
						<p:ajax event="keyup" update="addressMsg" global="false"/>
					</p:inputText>
					<h:panelGroup>
						<p:message id="addressMsg" for="address"/>
						<p:tooltip for="address" styleClass="tooltip" showEvent="focus" hideEvent="blur"></p:tooltip>
					</h:panelGroup>
					
					
					<p:outputLabel for="birthday" value="#{Message['label.birthday']} :" />
        			<p:calendar id="birthday" value="#{student.birthday}" navigator="true" pattern="yyyy-MMM-dd" />
 					<p:outputLabel for="birthday" value="" />
					
					
					<h:panelGroup>
						<h:outputLabel value="#{Message['label.type']} :"></h:outputLabel>
						<h:outputText style="" value=""></h:outputText>
					</h:panelGroup>
					
					<h:panelGroup>					
				        <p:selectOneRadio id="type" value="#{student.type}">
				            <f:selectItem itemLabel="New" itemValue="0"/>
				            <f:selectItem itemLabel="Pre" itemValue="1" />
				            <f:selectItem itemLabel="Archived" itemValue="2" />
				        </p:selectOneRadio>
					</h:panelGroup>
					
					<h:panelGroup>
						<p:message id="typeMsg" for="type"/>
						<p:tooltip for="type" styleClass="tooltip" showEvent="focus" hideEvent="blur"></p:tooltip>
					</h:panelGroup>
					
					
					
					<p:commandButton action="cancel" immediate="true" ajax="false" icon="ui-icon-arrowreturnthick-1-w" value="#{Message['button.cancel']}"></p:commandButton>
					<p:commandButton action="confirm" update="regPanelGrid, messages" icon="ui-icon-check" value="#{Message['button.save']}"></p:commandButton>
		   
		    </h:panelGrid>
		    
		</h:form>
	</ui:define>
                
                
</ui:composition>
